#!/bin/bash

config='/usr/local/etc/regdirsvn/regdirsvn.conf'

if ! source $config; then
  echo "Can not open config file: $config"
  exit
fi

$chkStatusDir $recDir

if [ -s $recDir'/checkDir' ]; then
  cat $recDir'/checkDir' | mail -s 'regdirsvn report: NG' $alertMail
else
  echo 'OK' | mail -s 'regdirsvn report: OK' $alertMail
fi
